DEBUG = -g
CPPFLAGS := -g -I ./include

# include lib/Makefile
VPATH = lib simplehttpclient simplehttpserver
SRC := messageheader.cpp httputil.cpp HTTPresponse.cpp HTTPclientconection.cpp HTTPServer.cpp
OBJ := $(subst .cpp,.o,$(SRC))

all: client server

client: simplehttpclient/test.cpp lib.a
	g++ $^ $(DEBUG) $(CPPFLAGS)  -o $@

server: simplehttpserver/test.cpp lib.a
	g++ $^ $(DEBUG) $(CPPFLAGS)  -o $@


lib.a : $(OBJ)
	ar cr $@ $^

%.o:%.c
	g++ -c $(DEBUG) $^
